<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>注册</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/gloab.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">
    <script src="js/jquery-1.11.1.min.js"></script>
    <script src="js/register.js"></script>
</head>
<body class="bgf4">
<div class="login-box f-mt10 f-pb50">
    <div class="main bgf">
        <div class="reg-box-pan display-inline">
            <div class="step">
                <ul>
                    <li class="col-xs-4 on" style="text-align: center; width: 75%;">
                        <span class="num"><em class="f-r5"></em><i>1</i></span>
                        <p class="lbg-txt">账号登录</p>
                    </li>
                </ul>
            </div>
            <div class="reg-box" id="verifyCheck" style="margin-top:20px;">
                <form id="regForm">
                    <div class="part1">
                        <div class="item col-xs-12">
                            <span class="intelligent-label f-fl"><b class="ftx04">*</b>手机号：</span>
                            <div class="f-fl item-ifo">
                                <input type="text" class="txt03 f-r3 required" keycodes="tel" tabindex="2" name="mobile"
                                       data-valid="isNonEmpty||isPhone" data-error="手机号码不能为空||手机号码格式不正确" maxlength="11"
                                       id="phone"/>
                                <span class="ie8 icon-close close hide"></span>
                                <label class="icon-sucessfill blank hide"></label>
                                <label class="focus">请填写11位有效的手机号码</label>
                                <label class="focus valid"></label>
                            </div>
                        </div>
                        <div class="item col-xs-12">
                            <span class="intelligent-label f-fl"><b class="ftx04">*</b>密码：</span>
                            <div class="f-fl item-ifo">
                                <input type="password" id="password" maxlength="20" class="txt03 f-r3 required" name="password"
                                       tabindex="3" style="ime-mode:disabled;" onpaste="return  false"
                                       autocomplete="off" data-valid="isNonEmpty"
                                       data-error="密码不能为空"/>
                                <span class="ie8 icon-close close hide" style="right:55px"></span>
                                <span class="showpwd" data-eye="password"></span>
                                <label class="icon-sucessfill blank hide"></label>
                                <label class="focus valid" id="errors"></label>
                                <span class="clearfix"></span>
                            </div>
                        </div>
                        <div class="item col-xs-12">
                            <span class="intelligent-label f-fl">&nbsp;</span>
                            <div class="f-fl item-ifo">
                                <a href="javascript:;" class="btn btn-blue f-r3" id="btn_part1">登录</a>
                            </div>
                        </div>

                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div class="m-sPopBg" style="z-index:998;"></div>
<script>
    $(function () {
        //第一页的确定按钮
        $("#btn_part1").click(function () {
            if (!verifyCheck._click()) return;
            $('#getMobile').html($('#phone').val());
            $(".step li").eq(1).addClass("on");

            $.ajax({
                type: "POST",
                url:"/user/sign",
                data:$('#regForm').serialize(),// 要提交的表单
                success: function(msg) {
                    if(msg == 201){
                        $('#errors').html(msg.message);
                    }else {
                        window.location.href = "/index.html";
                    }
                },
                error: function(error){alert(error);}
            });

        });
        //第二页的确定按钮
    });
</script>
</body>
</html>
